id: task-97 title: Cross-branch task ID checking and branch info status: Done assignee:
- '@Cursor' created_date: '2025-06-19' updated_date: '2025-06-20' labels: [] dependencies: []
Description
Check last task ID across all branches when creating tasks. Display branch containing latest task version in board.
Acceptance Criteria
- [x]
backlog task createchecks all local and remote branches for the highest task ID - [x] New tasks use an ID greater than any found across branches
- [x]
backlog boarddisplays which branch has the latest version of each task
Implementation Plan
- Fetch and scan
.backlog/tasksacross all branches to determine the max ID - Integrate branch detection into task creation logic
- Update board rendering to show the branch that last modified each task
Implementation Notes
- Added
listAllBranchesandgetFileLastModifiedBranchtosrc/git/operations.tsto handle git interactions across all branches. - Modified
generateNextIdinsrc/cli.tsto uselistAllBranchesandlistFilesInTreeto find the max task ID across all local and remote branches. - Added
branchproperty to theTasktype insrc/types/index.ts. - Moved
listTasksWithMetadatafromsrc/file-system/operations.tstosrc/core/backlog.tsand enhanced it to include the branch name usinggetFileLastModifiedBranch. - Updated
handleBoardViewinsrc/cli.tsto call the newcore.listTasksWithMetadatamethod. - Modified
renderBoardTuiinsrc/ui/board.tsto display the branch name in the task list on the board. - Corrected a bug in
src/cli.tsrelated to handling of repeatable options incommander.